package org.example.mediator;

import lombok.Data;

@Data
public abstract class User {
    private ChatRoom mediator;
    private String name;
    private String msg;
    private int userId;
    User(String name,int userId){
        this.name = name;
        this.userId = userId;
    }
    public ChatRoom getMediator(){
        return mediator;
    }
    public void setMediator(ChatRoom mediator){
        this.mediator = mediator;
    }

    abstract void chat(User user,String message);

}
